package models;
 
import java.util.*;
import javax.persistence.*;
 
import play.db.jpa.*;

@Entity
public class Comment extends Model {
	public Date postedAt;
	
	//public User commentedOnUser;
	public String commentedOnArtist;
	public String commentedOnSong;
	String commentedOnType;
	
	//  Tell JPA to use a large text database type to store the post content
	@Lob
	public String content;
	
	// Each Comment is authored by a single User, and that each User can author several Comments
	@ManyToOne
	public String author;
	
	public Comment(String author, String content) {
		this.author = author;
		this.content = content;
		this.postedAt = new Date();
		//this.commentedOnUser = commentedOnUser;
		//this.commentedOnArtist = null;
		//this.commentedOnSong = null;
		//commentedOnType = "user";
	}

	
}
